package com.bytedance.scenedemo.restore;

import com.bytedance.scene.Scene;
import com.bytedance.scene.ui.SceneAbility;
import ohos.utils.PacMap;
import static com.bytedance.scenedemo.restore.SupportRestoreRootScene.mClickCount;

public class SupportRestoreAbility extends SceneAbility {
    public static  PacMap inState;
    public static  int number = 0;
    public static int type = 0;
    @Override
    protected Class<? extends Scene> getHomeSceneClass() {
        mClickCount = 0;
        return SupportRestoreRootScene.class;
    }

    @Override
    protected boolean supportRestore() {
        return true;
    }

    @Override
    public void onSaveAbilityState(PacMap outState) {
        super.onSaveAbilityState(outState);
        this.inState = outState;
        outState.putIntValue("mClickCount", mClickCount);
    }

    @Override
    public void onRestoreAbilityState(PacMap inState) {
        super.onRestoreAbilityState(inState);
        type = 2;
    }

}
